<?php
/**
 * 描述：企业商铺-供应商品。
 */
final class Exec_Store_Supply extends Exec_Store_Public
{
    public function Get()
    {
        #获取参数
        $account=parent::Get();

        #获取供应信息数据
        $supplies=DB::PGetData('select * from supply where Account=? limit ?,8',array($account['Username']));
        foreach($supplies['Record'] as $key=>$value)
        {
            $supplies['Record'][$key]['ThumbnailPath']=Config::PATH_RELATIVE_ATTACHMENT_SUPPLY.'/'.$supplies['Record'][$key]['ThumbnailPath'];
        }
        View::Assign('Supplies',$supplies['Record']);
        View::Assign('PageMenu',PagerFactory::Create('Common')->Fetch($supplies,array
        (
            'URL'=>'exec.php?action=store_supply&id='.$account['ID'],
            'IsDetail'=>TRUE,
            'Rewriter'=>new PagerRewrite('/store/'.$account['ID'].'/supply','','html')
        )));

        #渲染输出
        View::Display('store/supply.tpl');
    }
}
?>